#include <stdio.h>

// 不同的标记位表示不同的选项
// 下面的每个宏对应的数值，只有一个比特位是1，彼此的位置不重叠
#define ONE (1<<0)
#define TWO (1<<1)
#define THREE (1<<2)
#define FOUR (1<<3)

void show(int flags)
{
    if(flags & ONE) printf("ONE\n");
    if(flags & TWO) printf("TWO\n");
    if(flags & THREE) printf("THREE\n");
    if(flags & FOUR) printf("FOUR\n");

}

int main()
{
    show(ONE);
    printf("--------------------\n");
    show(TWO);
    printf("--------------------\n");
    show(ONE | TWO);
    printf("--------------------\n");
    show(ONE | TWO | THREE);
    printf("--------------------\n");
    show(ONE | TWO | THREE | FOUR);

    return 0;
}
